In [1]:
from IPython.display import Image
In [5]:
from IPython.html.services.config import ConfigManager
from IPython.utils.path import locate_profile
cm = ConfigManager(profile_dir=locate_profile(get_ipython().profile))
cm.update('livereveal', {
'theme': 'simple',
'start_slideshow_at': 'selected',
})
Out[5]:
In [6]:
%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
import numpy as np
import pandas as pd
Now a Data Scientist at Silicon Valley Data Science (SVDS):
Working on small teams (~4-6 people)
Different technical environments
And, finally... commit:
.ipynb
.py
.html
of all Notebooks (develop and deliver).
Add the following slide's code to: ipython_notebook_config.py
Find the snippet here: http://bit.ly/post-save-hook-snippet (https://gist.github.com/jbwhit/881bdeeaae3e4128947c)
Modified code from: https://github.com/ipython/ipython/issues/8009 by github user: https://github.com/minrk
import os
from subprocess import check_call
def post_save(model, os_path, contents_manager):
"""post-save hook for converting notebooks to .py and .html files."""
if model['type'] != 'notebook':
return # only do this for notebooks
d, fname = os.path.split(os_path)
check_call(['ipython', 'nbconvert', '--to', 'script', fname], cwd=d)
check_call(['ipython', 'nbconvert', '--to', 'html', fname], cwd=d)
c.FileContentsManager.post_save_hook = post_save
ipython profile create nbserver
Which creates the following files:
In [ ]: